Skip to content

refactor: unify android runtime c++ layout#45

Open
DjDeveloperr wants to merge 16 commits into
codex/import-napi-android-history-lfsfrom
codex/plan-android-cpp-refactor
Open

refactor: unify android runtime c++ layout#45
DjDeveloperr wants to merge 16 commits into
codex/import-napi-android-history-lfsfrom
codex/plan-android-cpp-refactor

Conversation

@DjDeveloperr
Copy link
Copy Markdown
Collaborator

@DjDeveloperr DjDeveloperr commented Jun 6, 2026

Summary

  • keep the imported Android Java/project sources under platforms/android, while sharing Android C++ through NativeScript/runtime/android, NativeScript/napi/android, and NativeScript/ffi/jni/napi
  • keep Apple FFI under NativeScript/ffi/objc and update generated-output/test wiring for the unified layout
  • collapse Android HERMES and SHERMES onto the same Static Hermes (shermes) header/library surface already used by Apple; SHERMES remains only a compatibility engine selector
  • harden JNI Node-API constructor/object fallback behavior for Static Hermes and preserve ObjC bridge ownership/expandos across Apple engines
  • keep iOS/macOS direct engines unchanged in scope; Android-only engines were probed on Apple and remain unwired/unsupported for this PR

Commit Review Order

  1. Layout moves and Android build wiring:
    • b16346f1 refactor: move objc ffi under platform namespace
    • 055964e5 refactor: move android jni napi ffi into shared tree
    • a0a2ed87 refactor: move android runtime sources into shared tree
    • 8d214e29 refactor: move android napi engines into shared tree
    • 04c486be refactor: wire android build to unified runtime layout
  2. Behavior preservation and cleanup after the move:
    • 3aab3c3b fix(apple): update objc ffi generated paths
    • 4def1b90 fix(android): align hermes napi adapters
    • 86dec82f fix(android): preserve unified runtime behavior
    • da00c3af fix(android): stabilize runtime test harness
    • fd62fdb5 test(android): gate engine-specific runtime specs
    • 6bff08ee fix: clean up runtime refactor paths
  3. Static Hermes unification:
    • 15d7c2a4 refactor(android): unify static hermes backend
  4. Final review/test fixes:
    • 98918758 fix(jni): handle static hermes constructor receivers
    • 5bc35047 fix(objc): preserve bridge object ownership
    • 1668c885 fix(quickjs): clear weak refs before forced gc
    • 6ba820c1 test(ios): skip app main in scripted runner

Validation

  • Android all-engine matrix, Pixel_9_Pro_API_36 emulator, JDK 17, logs in /tmp/ns-runtime-android-matrix-final3:
    • V8-10, V8-11, V8-13, QUICKJS, QUICKJS_NG, HERMES, SHERMES, JSC, PRIMJS: all PASS
  • iOS simulator direct-engine matrix, logs in /tmp/ns-runtime-apple-matrix-final7:
    • v8: 713 specs, 0 failures, 13 skipped
    • hermes: 713 specs, 0 failures, 11 skipped
    • quickjs: 713 specs, 0 failures, 13 skipped
    • jsc: 713 specs, 0 failures, 13 skipped
  • macOS direct-engine matrix, logs in /tmp/ns-runtime-apple-matrix-final7:
    • v8: 713 specs, 0 failures, 10 skipped
    • hermes: 713 specs, 0 failures, 8 skipped
    • quickjs: 713 specs, 0 failures, 10 skipped
    • jsc: 713 specs, 0 failures, 10 skipped
  • Android-only engine probe on Apple CMake: primjs, quickjs_ng, v8-10, v8-11, and v8-13 are still unsupported/unwired on Apple in this PR
  • Hygiene:
    • git diff --check
    • npm run check:ffi-boundaries
    • python3 -m py_compile metadata-generator/build-step-metadata-generator.py
    • stale-path/debug sweeps for removed Hermes/fbjni paths and temporary ObjC debug prints

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 6, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7f53772b-8a48-458c-adf5-be752fe18491

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/plan-android-cpp-refactor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DjDeveloperr DjDeveloperr marked this pull request as ready for review June 6, 2026 19:10
@ammarahm-ed ammarahm-ed self-requested a review June 8, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant